package com.hqully.labmanage.domain.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * [DeviceFaultRecord]DTO
 *
 * @author hqully
 * @date 2022-10-14 14:44:06
 */
@ApiModel(description = "设备故障记录表")
@Data
public class DeviceFaultRecordDTO implements Serializable {

    private static final long serialVersionUID = 903942380004417639L;
    
    /**
     * 物理id
     */
    @ApiModelProperty("物理id")
    @NotNull(message = "物理id不能为空")
    private Long id;
    
    /**
     * 故障id
     */
    @ApiModelProperty("故障id")
    private Long faultId;


    /**
     * 用户id
     */
    @ApiModelProperty("用户id")
    private Long userId;

    /**
     * 设备id
     */
    @ApiModelProperty("设备id")
    private String deviceId;
    
    /**
     * 故障发生时间
     */
    @ApiModelProperty("故障发生时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime occurTime;
    
    /**
     * 故障详情
     */
    @ApiModelProperty("故障详情")
    private String faultInfo;
    
    /**
     * 是否已处理
     */
    @ApiModelProperty("是否已处理")
    @NotNull(message = "是否已处理不能为空")
    private Boolean processed;
    
    /**
     * 故障处理时间
     */
    @ApiModelProperty("故障处理时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime processTime;
    
    /**
     * 故障记录id
     */
    @ApiModelProperty("故障记录id")
    @NotBlank(message = "故障记录id不能为空")
    @Length(max = 255, message = "故障记录id长度不能超过255")
    private String recordId;

    /**
     * 故障发生地点
     */
    @ApiModelProperty("故障发生地点")
    @Length(max = 255, message = "故障发生地点长度不能超过255")
    private String locale;

    /**
     * 故障记录是否已读
     */
    @ApiModelProperty("故障记录是否已读")
    private Boolean read;
    

}

